<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>垂直居中</title>
    <style>

        /*大范围用grid，导航栏还是flex更好*/
        ul {
            width: 300px;
            height: 200px;
            margin: auto;
            background: red;
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            align-items: center;
            justify-content: center;
        }

        li {
            list-style-type: none;
        }
    </style>
</head>
<body>

<ul>
    <li><a href="">主站</a></li>
    <li><a href="">番剧</a></li>
    <li><a href="">游戏</a></li>
    <li><a href="">直播</a></li>
    <li><a href="">漫画</a></li>
</ul>


</body>
</html>